package com.mc.serviceImpl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mc.dao.MenuMapper;
import com.mc.model.Menu;
import com.mc.service.MenuService;
@Service
public class MenuServiceImpl implements MenuService {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(MenuServiceImpl.class);

    @Autowired
	private MenuMapper menuMapper;
    
	
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return menuMapper.deleteByPrimaryKey(id);
	}

	
	public int insert(Menu record) {
		// TODO Auto-generated method stub
		return menuMapper.insert(record);
	}

	
	public int insertSelective(Menu record) {
		// TODO Auto-generated method stub
		return menuMapper.insertSelective(record);
	}

	
	public Menu selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		logger.info(menuMapper.selectByPrimaryKey(1));
		return menuMapper.selectByPrimaryKey(1);
	}

	
	public int updateByPrimaryKeySelective(Menu record) {
		// TODO Auto-generated method stub
		return menuMapper.updateByPrimaryKeySelective(record);
	}

	
	public int updateByPrimaryKey(Menu record) {
		// TODO Auto-generated method stub
		return menuMapper.updateByPrimaryKey(record);
	}

	
	public List<Menu> selectAllMenu() {
		// TODO Auto-generated method stub
		return menuMapper.selectAllMenu();
	}

}
